<template>
    <div>
<van-search
  v-model="value"
  shape="round"
  background="#4fc08d"
  placeholder="请输入搜索关键词"
    @search="onSearch"
/>
    </div>
</template>

<script setup>
import {ref} from "vue"
import { useRoute, useRouter } from 'vue-router'

const router = useRouter()
const route = useRoute()

let value=ref("")
const onSearch=(e)=>{
router.push({name:"search",params:value})
}
</script>

<style lang="scss" scoped>

</style>